package base.day24;

import java.io.*;
import java.util.Arrays;

public class MyCharacterStream8 {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new FileReader("E:\\java\\java project\\java-code\\d.txt"));
        String line = br.readLine();
        String[] s = line.split(" ");
        int[] newarray=new int[s.length];
        for (int i = 0; i < newarray.length; i++) {
            newarray[i]= Integer.parseInt(s[i]);
        }

        for (int i = 0; i < newarray.length-1; i++) {
            for (int j = 0; j < newarray.length-1-i; j++) {
                if (newarray[j]>newarray[j+1]){
                    int temp=newarray[j];
                    newarray[j]=newarray[j+1];
                    newarray[j+1]=temp;
                }
            }
        }
        BufferedWriter bw=new BufferedWriter(new FileWriter("E:\\java\\java project\\java-code\\e.txt"));
        for (int i = 0; i < newarray.length; i++) {
            bw.write(newarray[i]+" ");
            bw.flush();
        }
        bw.close();
    }
}
